package com.xxh.dasongapp.common;


/**
 * 统一的状态码定义
 **/
public enum ResultCode {


 SUCCESS("200", "成功!"),
 CREATED("201", "对象创建成功"),
 ACCEPTED("202", "请求已经被接受!"),
 NO_CONTENT("204", "操作已经执行成功，但是没有返回数据"),

 MOVED_PERM("301", "资源已被移除"),
 SEE_OTHER("303", "重定向"),
 NOT_MODIFIED("304", "资源没有被修改"),

 BAD_REQUEST("400","请求错误"),
 UNAUTHORIZED("401","未登录"),
 FORBIDDEN("403", "未授权，访问受限"),
 NOT_FOUND("404", "未找到该资源"),
 BAD_METHOD("405", "不允许的http方法"),
 CONFLICT("409", "资源冲突，或者资源被锁"),

 ERROR("500", "服务器错误"),
 PARAMETER_EXCEPTION("501", "请求参数校验异常"),
 SERVER_BUSY("503","服务器正忙，请稍后再试!"),


 /* 业务状态码 */
 USER_NOT_EXIST_ERROR("10001", "用户不存在"),
 ;

 private String code;
 private String msg;




ResultCode(String code, String msg) {
  this.code = code;
  this.msg = msg;
 }

 public String getCode() {
  return code;
 }

 public void setCode(String code) {
  this.code = code;
 }

 public String getMsg() {
  return msg;
 }

 public void setMsg(String msg) {
  this.msg = msg;
 }
}